﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using System.Web.Security;
using WmWebSystem.Models;
using WmWebSystem.DbHelper;
using WmWebSystem.Service;

namespace WmWebSystem.Controllers
{
    public class HomeController : Controller
    {
        WmDb mydb = new WmDb();

        public ActionResult Index()
        {
            var ps = SliderHelper.AllSlider();
            ViewData["Sliders"] = ps;

            var pro = ProjectHelper.FindAllProjectByStatus(1);
            ViewData["ProjectList"] = pro;

            return View();
        }

        public ActionResult About()
        {
            var model = NewsHelper.FindOneNewsby(2);
            return View(model);
        }

        public ActionResult OurTeam()  
        {
            var model = NewsHelper.FindOneNewsby(5);
            return View(model);
        }


        public ActionResult Author()  //创作者
        {
            var model = UserAccountHelper.FindAll();
            ViewData["Authors"] = model;
            return View();
        }

        public ActionResult Flow()   //流程
        {
            var model = NewsHelper.FindOneNewsby(3);
            return View(model);
        }

        public ActionResult Inspiration()   //灵感
        {
            return View();
        }

        public ActionResult OurPartner()   //合作者
        {
            var model = NewsHelper.FindOneNewsby(6);
            return View(model);
        }

            //新闻公告 = 1,
            //守望者简介 = 2,
            //项目流程 = 3,
            //注册协议 = 4,
            //团队介绍 = 5,
            //合作者 = 6

    }
}
